package com.java.basis.io.stream;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

/**
 * @author wangning
 * @create 2021-06-11 16:46
 */
public class TestChar01 {
	public static void main(String[] args) throws Exception {
		for (int i = 0; i < 65535; i++) {
			char c = (char) i;
			System.out.println(i + " = " + c);
		}
		FileOutputStream fileOutputStream = new FileOutputStream("F:/jt/file/char.txt");
		OutputStreamWriter out = new OutputStreamWriter(fileOutputStream, "UTF-8");
		for (int i = 0; i < 65535; i++) {
			char c = (char) i;
			out.write(i + ":" + c);
			out.write("\n");
		}
		out.write("写入成功！！！！！！");
		out.close();
		fileOutputStream.close();
	}
}
